﻿using Easy.Services.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Easy.Services.Config
{
    internal class InterConfig : IEntityTypeConfiguration<Inter>
    {
        public void Configure(EntityTypeBuilder<Inter> builder)
        {
            builder.ToTable(nameof(Inter));

            builder.Property(r => r.CreaterDate);
            builder.Property(r => r.CreaterId).IsRequired(false);
            builder.Property(r => r.CreaterName).HasMaxLength(50).IsRequired(false);
            builder.Property(r => r.EditDate).IsRequired(false);
            builder.Property(r => r.EditId).IsRequired(false);
            builder.Property(r => r.EditName).HasMaxLength(50).IsRequired(false);
            builder.Property(r => r.IsDelete).IsRequired(false);

            builder.Property(r => r.InterName).HasMaxLength(200).IsRequired(false);
            builder.Property(r => r.IPAddr).HasMaxLength(100).IsRequired(false);

        }
    }
}
